//#pragma once

enum T {
	EOI=0x100,
	ID, 
	JSID,
	STRING, 
	NUMBER, 
	COMMENT, 
	ANY,
	VAR, FUNCTION, THROW, CATCH, NEW, DELETE,
	BREAK, CASE, CONTINUE, DEFAULT, ELSE,
	FOR, IF, RETURN, TYPEOF, SWITCH, VOID,
	WHILE, IN, INSTANCEOF, EQ, DEQ, NEQ
};


void print_token(int tok){
	switch (tok) {
		case ID: printf("ID"); break; 
		case JSID: printf("JSID"); break; 
		
		case STRING: printf("STRING"); break; 
		case NUMBER: printf("NUMBER"); break; 
		case COMMENT: printf("COMMENT"); break; 
		case ANY: printf("ANY"); break; 
		case VAR: printf("VAR"); break; 
		case FUNCTION: printf("FUNCTION"); break; 
		case THROW: printf("THROW"); break; 
		case CATCH: printf("CATCH"); break; 
		case NEW: printf("NEW"); break; 
		case DELETE: printf("DELETE"); break; 
		case BREAK: printf("BREAK"); break; 
		case CASE: printf("CASE"); break; 
		case CONTINUE: printf("CONTINUE"); break; 
		case DEFAULT: printf("DEFAULT"); break; 
		case ELSE: printf("ELSE"); break; 
		case FOR: printf("FOR"); break; 
		case IF: printf("IF"); break;  
		case RETURN: printf("RETURN"); break;  
		case TYPEOF: printf("TYPEOF"); break;  
		case SWITCH: printf("SWITCH"); break;  
		case VOID: printf("VOID"); break; 
		case WHILE: printf("WHILE"); break;  
		case IN: printf("IN"); break;  
		case INSTANCEOF: printf("INSTANCEOF"); break;  
		case EQ: printf("EQ"); break;  
		case DEQ: printf("DEQ"); break;  
		case NEQ: printf("NEQ"); break;
		default: printf("'%c'", tok);
	}
	printf(" ");
}






